Release 10.1A: OpenEdge Development:
Progress 4GL Handbook


Accessing the browse columns

Each of the browse columns is an object in its own right, with its own handle. If you want to set individual column attributes at run time (for example, to enable columns for update), you set those attributes through the handle. Static browse columns are objects with handles as well, but you can also access those by name. Dynamic browse columns, like other dynamic objects, have no name, so you must use their handle.

Note: To make a dynamic browse column updateable, set its READ-ONLY attribute to false. Browse columns do not use the SENSITIVE attribute.

The browse FIRST-COLUMN attribute returns the handle to the first (leftmost) column in the browse. Each column’s NEXT-COLUMN attribute returns the handle of the column next to it. For example, you can add this block of code to the OlineFields LEAVE trigger:

/* You can use code such as this to navigate through 
      the columns of a browse dynamically. */ 
  DEFINE VARIABLE hCol AS HANDLE     NO-UNDO. 
  DEFINE VARIABLE cCols AS CHARACTER NO-UNDO. 
  hCol = hBrowse:FIRST-COLUMN. 
  DO WHILE VALID-HANDLE(hCol): 
      cCols = cCols + CHR(10) + hCol:LABEL.  /* CHR(10) is a line feed. */ 
      hCol = hCol:NEXT-COLUMN. 
  END. 
  MESSAGE cCols. 

When you run the procedure again and select fields, Figure 18–16 shows what you see.

Figure 18–16: Result of COLUMN example


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095